<?php

namespace api\controller;

// +----------------------------------------------------------------------
// | App应用控制层
// +----------------------------------------------------------------------

use common\controller\VerifyController;
use common\service\OauthService;
use common\service\TenantOptionsService;
use think\Request;

class TenantOptionsController extends VerifyController
{

    private $tenantOptionsService;

    public function __construct()
    {
        parent::__construct();
        $this->tenantOptionsService = new TenantOptionsService();
    }

    /**
     * 创建与保存
     * @param Request $request
     * @return \think\Response
     * @throws \Exception
     */
    public function save(Request $request)
    {
        $param = $request->param()['data'];
        $param['tenant_id'] = $request->getTenantId();
        $res = $this->tenantOptionsService->save($param);
        return json(success_response("", $res));
    }
}